/**   
 * @Title: RestController.java 
 * @Package com.dragon.learn.web.controller 
 * @Description: TODO(用一句话描述该文件做什么) 
 * @author dragon   
 * @date 2018年8月22日 上午10:47:08 
 * @version V1.0   
 */
package com.dragon.learn.web.controller;

import com.dragon.learn.web.vo.MyVO;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/** 
 * @ClassName: RestController 
 * @Description: TODO(这里用一句话描述这个类的作用) 
 * @author dragon
 * @date 2018年8月22日 上午10:47:08 
 *  
 */
@RestController
@RequestMapping(value = "rest")
public class RestController1 { 
	//produces = "application/xml
	//, produces = "application/json"/
	//①Accept：text/html,application/xml,application/json

	@RequestMapping(value = "/getvo1", produces = "text/plain;charset=UTF-8")
	public MyVO getvo1(HttpServletRequest request, HttpServletResponse response) {
		
		return new MyVO().init();
	}
	@RequestMapping(value = "/getvo2", method = RequestMethod.GET)
	public MyVO getvo2(HttpServletRequest request, HttpServletResponse response) {
		
		return new MyVO().init();
	}
	@RequestMapping(value = "/getvo3", produces = "application/xml;charset=UTF-8")
	public MyVO getvo3(HttpServletRequest request, HttpServletResponse response) {
		
		return new MyVO().init();
	}
	@RequestMapping(value = "/getvo4", produces = "application/json;charset=UTF-8")
	public MyVO getvo4(HttpServletRequest request, HttpServletResponse response) {
		
		return new MyVO().init();
	}
	
	@RequestMapping(value = "/getvos1", produces = "text/plain;charset=UTF-8")
	public List<MyVO> getvos1(HttpServletRequest request, HttpServletResponse response) {
		
		return new MyVO().inits();
	}
	@RequestMapping(value = "/getvos2", method = RequestMethod.GET)
	public List<MyVO> getvos2(HttpServletRequest request, HttpServletResponse response) {
		
		return new MyVO().inits();
	}
	
	
}
